def mean_values(*args):  # 可变长度的位置参数
    print(type(args), args)  # 元组

    mean = 0
    tital = 0
    least_one_number = False
    if len(args)==0:
        return 0

    for i in args:
        # if type(i) is int or type(i) is float:
        if isinstance(i, (int, float)):
            least_one_number = True
            mean += i
            tital += 1
    if not least_one_number:
        return "请确保传入的参数中至少有一个是数字"
    return mean/tital


mean = mean_values(22,"a")
# mean = mean_values()
print(mean)
